Skip to content

Conversation

@mark-vieira
Copy link
Contributor

@mark-vieira mark-vieira commented Mar 3, 2025

Some system modules are not initially loaded by the boot module layer. An example is something like jdk.management.agent which dynamically loaded by various external tools, such as IDEs when performing thread or heap dumps.

We now proactively add this module via --add-modules to the server so it's known to the PolicyManager on startup.

@mark-vieira mark-vieira added >non-issue auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.1 v8.19.0 :Core/Infra/Entitlements Entitlements infrastructure labels Mar 3, 2025
@mark-vieira mark-vieira requested a review from a team as a code owner March 3, 2025 23:51
@elasticsearchmachine elasticsearchmachine added v9.1.0 Team:Core/Infra Meta label for core/infra team labels Mar 3, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.findModule(module.getName())
.map(ResolvedModule::reference)
.orElse(null);
return module == PolicyManager.class.getModule() || (moduleReference != null && systemModules.contains(moduleReference));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's the entitlements module we could return earlier? Then we don't need to do the reference unwrapping.

@mark-vieira mark-vieira changed the title Correctly identify system modules not included in boot module layer Add jdk.management.agent module to server boot layer on start Mar 4, 2025
@mark-vieira
Copy link
Contributor Author

@rjernst as discussed I've modified this to simply add the jdk.management.agent module on startup.

Copy link
Contributor

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0
8.18
8.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Entitlements Entitlements infrastructure >non-issue Team:Core/Infra Meta label for core/infra team v8.18.1 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants